package cn.tedu.mall.order.mapper;

import cn.tedu.mall.pojo.order.model.OmsOrder;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface OrderMapper {

    @Select("select count(*) from oms_order where sn=#{sn}")
    boolean selectCountBySn(@Param("sn") String sn);

    void insertOrder(OmsOrder omsOrder);
    @Select("select * from oms_order where sn=#{sn}")
    OmsOrder selectOrderBySn(@Param("sn")String sn);
    @Update("update oms_order set state=1 where sn=#{sn}")
    void shutDownOrderBySn(@Param("sn")String sn);
}
